package xin.ryven.car.android.api

import retrofit2.Response
import retrofit2.http.Body
import retrofit2.http.POST

data class SendVerificationCodeRequest(
    val phone: String
)

data class SendVerificationCodeResponse(
    val code: Int,
    val msg: String,
    val data: Any? = null
)

data class LoginRequest(
    val phone: String,
    val code: String
)

data class LoginData(
    val token: String,
    val username: String
)

data class LoginResponse(
    val code: Int,
    val msg: String,
    val data: LoginData
)

interface AuthApi {
    @POST("auth/sms/code")
    suspend fun sendVerificationCode(@Body request: SendVerificationCodeRequest): Response<SendVerificationCodeResponse>

    @POST("auth/sms/login")
    suspend fun login(@Body request: LoginRequest): Response<LoginResponse>
} 